﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QLKS2014.PUBLIC;
using QLKS2014.DATA;
using System.Data;

namespace QLKS2014.BLL
{
    public class PhongBll
    {
        PhongData phongData = new PhongData();
        //public DataTable selectAll()
        //{
        //  return phongData.selectAll();
        //}

        public List<PhongPublic> selectAll()
        {
            return phongData.selectAll();
        }

        public List<PhongPublic> selectByTenPhong(PhongPublic phongPublic)
        {
            return phongData.selectByTenPhong(phongPublic);
        }


        public List<PhongPublic> selectByMaLoaiPhong(PhongPublic phongPublic)
        {
            return phongData.selectByMaLoaiPhong(phongPublic);
        }


        //Tìm Phòng Trống
        public List<PhongPublic> selectPhongEmpty()
        {
            return phongData.selectPhongEmpty();
        }

        //Tìm Phòng Đã Thuê
        public List<PhongPublic> selectPhongNotEmpty()
        {
            return phongData.selectPhongNotEmpty();
        }
        //Thêm Phòng
        public void insert(PhongPublic phongPublic)
        {
            phongData.insert(phongPublic);
        }

        ////Tìm Phòng Thuê Trong thời gian = NgayThue
        //public List<PhongPublic> selectByRentTime(DateTime ngayDau, DateTime ngayCuoi)
        //{
        //    return phongData.selectByRentTime(ngayDau,ngayCuoi);
        //}

        //Update Phòng
        public int update(PhongPublic phongPublic)
        {
            return phongData.update(phongPublic);
        }
        public void update_Day(PhongPublic phong0)
        {
            phongData.update_Day(phong0);
        }

        public void update_Trong(PhongPublic phong0)
        {
            phongData.update_Trong(phong0);
        }

        //Xóa Phòng có MaPhong = "ID"
        public void deleteById(PhongPublic phongPublic)
        {
            phongData.deleteById(phongPublic);
        }

    }
}
